/**
 * Created by zhuli on 2023/11/16.
 * */
#ifndef MIDDLEWARE_INTERFACEINFO_H
#define MIDDLEWARE_INTERFACEINFO_H


#include <string>

/**
 * 登记在注册中心的接口记录，以字符串形式存储
 */
class InterfaceInfo {
public:
    std::string domainId;
    std::string interfaceName = "";
    std::string dataStruct = "";
    std::string protocol = "";
    std::string ip = "";
    int port;
    bool valid = true;

    static void stringToRecord(InterfaceInfo *pRecord, const std::string str);
    
    std::string ifKey();
    void recordToString(char *buffer);
    bool operator==(InterfaceInfo &that);
    bool operator!=(InterfaceInfo &that);
};


#endif //MIDDLEWARE_INTERFACEINFO_H
